﻿using System;
using System.Collections.Generic;
using System.Web;

/// <summary>
///消息内容配置
/// </summary>
public class Message
{
    private const string SUCCESS = "\"result\":\"success\", \"data\":{0}";
    private const string FAIL = "\"result\":\"fail\", \"message\":\"{0}\"";

    public static string CreateMessage(bool isSuccess, string content)
    {
        return "{" + string.Format(isSuccess ? SUCCESS : FAIL, content) + "}";
    }
}